<template>
  <div class="product-item" :class="{
    'product-item-opacity': isOpacity,
    'product-item-active': active && isOpacity
  }">
    <div class="product-item_head l-f l-row-sb">
      <p class="product-item_head_title">
        {{ options.day }} {{ $t("account.days") }}
      </p>
      <img
        class="product-item_head_icon"
        src="@/assets/icons/icon-right.svg"
        alt=""
      />
    </div>
    <div class="product-item_inner">
      <div class="product-item_info l-f l-row-sb">
        <p class="product-item_info_label">{{ $t("account.amount") }}</p>
        <p class="product-item_info_value">
          ${{ options.min_money }}-${{ options.max_money }}
        </p>
      </div>
      <div class="product-item_info l-f l-row-sb">
        <p class="product-item_info_label">
          {{ $t("aiTrading.dailyIncome") }}
        </p>
        <p class="product-item_info_value l-text-gradient">
          ${{ options.rate }}-${{ options.rate_max }}
        </p>
      </div>
      <div class="product-item_icons">
        <CoinTypes />
      </div>
    </div>
  </div>
</template>

<script setup>
import CoinTypes from '@/components/coinTypes/index.vue'

defineProps({
  options: {
    type: Object,
    default: function () {
      return {};
    },
  },
  active: {
      type: Boolean,
      default: false
  },
  isOpacity: {
      type: Boolean,
      default: false
  }
});

</script>

<style lang="scss" scoped>
.product-item {
  border-radius: 15px;
  background-color: #191934;
  min-width: 269px;
  cursor: pointer;
  &_head {
    padding: 16px 16px 12px;
    box-sizing: border-box;
    background-color: #ffffff05;
    &_title {
      font-size: 16px;
      color: #ffffff;
      font-weight: 700;
    }
    &_icon {
      width: 8px;
      height: 12px;
    }
  }
  &_info {
    gap: 8px;
    margin-bottom: 16px;
    &_label {
      font-size: 16px;
      color: #ffffff80;
      font-weight: 500;
    }
    &_value {
      font-size: 16px;
      color: #ffffff;
      font-weight: 500;
    }
  }
  &_icons {
    &_icon {
      width: 19px;
      height: 19px;
      margin-right: 10px;
    }
  }
  &_inner {
    padding: 20px 16px 16px;
    box-sizing: border-box;
  }
}
.product-item-opacity {
  opacity: .2;
}
.product-item-active {
  opacity: 1;
  border: .8px solid rgba(255,255,255,.5)
}
@media only screen and (max-width: 1200px) {
  .product-item {
    min-width: initial;
    &_head {
      padding: 14px 14px 12px;
      &_title {
        font-size: 14px;
      }
      &_icon {
        width: 8px;
        height: 10px;
      }
    }
    &_info {
      gap: 8px;
      margin-bottom: 10px;
      &_label {
        font-size: 14px;
      }
      &_value {
        font-size: 14px;
      }
    }
    &_icons {
      &_icon {
        width: 19px;
        height: 19px;
        margin-right: 10px;
      }
    }
    &_inner {
      padding: 18px 14px 14px;
      box-sizing: border-box;
    }
  }
}
</style>